import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '项目',
    align: "center", resizable: true,
    dataIndex: 'projectId_dictText'
  },
  {
    title: '标题',
    align: "center", resizable: true,
    dataIndex: 'title'
  },
     {
    title: '报价记录',
    align: "center",
      resizable: true,
    dataIndex: 'quoteRecord'
  },
    {
    title: '状态',
    align: "center", resizable: true,
    dataIndex: 'status'
  },
  {
    title: '项目编号',
    align: "center", resizable: true,
    dataIndex: 'projectNumber'
  },
  {
    title: '申请日期',
    align: "center", resizable: true,
    dataIndex: 'applicationDate',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
  },
  {
    title: '项目名称',
    align: "center", resizable: true,
    dataIndex: 'projectName'
  },
  {
    title: '优先级',
    align: "center", resizable: true,
    dataIndex: 'priority'
  },
  {
    title: '仓库',
    align: "center", resizable: true,
    dataIndex: 'warehouse'
  },
    {
    title: '附件',
    align: "center", resizable: true,
    dataIndex: 'appendix'
  },
];

// 高级查询数据
export const superQuerySchema = {
  projectId: {title: '项目',order: 0,view: 'list', type: 'string',dictCode: '',},
  status: {title: '增项状态',order: 1,view: 'list', type: 'string',dictCode: '',},
  title: {title: '标题',order: 3,view: 'text', type: 'string',},
  projectNumber: {title: '项目编号',order: 4,view: 'text', type: 'string',},
  applicationDate: {title: '申请日期',order: 6,view: 'date', type: 'string',},
  projectName: {title: '项目名称',order: 8,view: 'text', type: 'string',},
  priority: {title: '优先级',order: 11,view: 'text', type: 'string',},
  warehouse: {title: '仓库',order: 12,view: 'text', type: 'string',},
};
